<?php
define ( 'CORE_PATH', dirname(__FILE__));

class Core {
	public static function run($application = 'WebApplication', $frameworkPath = './Yii') {
		include $frameworkPath . '/' . (extension_loaded ( 'apc' ) ? 'yiilite.php' : 'yii.php');
		include CORE_PATH . '/components/' . $application . '.php';
		
		$application = Yii::createApplication ( $application, CORE_PATH . '/config/main.php' );
		$application->run ();
	}
}
?>